<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>11demo</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    <counter></counter>
</div>
<script type = "text/javascript">

    //定义组件
    const couter = {
        template:"<h2>Hello component</h2>",
        data(){
            return{num:1}
        }
    }

    //注册组件
    Vue.component("counter",couter)

    var app=new Vue({
         el:"#app",
        data:{

        },

    })
</script>
</body>
</html>